Skip to content

Fix .gitignore so the in-package eia.data resource directory is tracked#3

Open
SolvoFounder wants to merge 1 commit into
datons:mainfrom
SolvoFounder:fix/gitignore-swallows-eia-data-package
Open

Fix .gitignore so the in-package eia.data resource directory is tracked#3
SolvoFounder wants to merge 1 commit into
datons:mainfrom
SolvoFounder:fix/gitignore-swallows-eia-data-package

Conversation

@SolvoFounder
Copy link
Copy Markdown

Fixes #2

Root cause

from eia import EIAClient runs eia/catalog.py at import time, which calls importlib.resources.files("eia.data") to load routes.yaml / recipes.yaml. That raises ModuleNotFoundError: No module named 'eia.data' because the eia.data package is not present in installed builds.

Digging in, the underlying reason is in .gitignore: the pattern data is unanchored, so per gitignore rules it matches a directory named data at any depth — including the in-package resource directory src/eia/data/. So routes.yaml / recipes.yaml (and an __init__.py) get silently skipped by git add, never reach the repo, CI, or the published wheel/sdist. (The project's own tests/test_catalog.py asserts len(ROUTES) > 0 and looks up specific routes/recipes, which only pass when those YAML files exist locally.)

Fix

Anchor the rule to /data so it still ignores a top-level scratch data/ directory but no longer swallows src/eia/data/. Verified locally: after the change git check-ignore no longer matches src/eia/data/* while a top-level data/ is still ignored.

Note: this unblocks tracking the package but the curated routes.yaml / recipes.yaml still need to be committed by a maintainer (they were never in git due to this rule) — happy to follow up however you prefer. Thanks for the library!

The unanchored `data` pattern in .gitignore matches at any depth, so it
also excludes `src/eia/data/` — the package that ships routes.yaml and
recipes.yaml. As a result `eia.data` is never committed, never reaches
CI or the published wheel, and `from eia import EIAClient` fails with
`ModuleNotFoundError: No module named 'eia.data'` (catalog.py loads the
YAML at import time).

Anchoring the rule to `/data` keeps a top-level scratch `data/` directory
ignored while letting the in-package resource directory be tracked.

Fixes datons#2
west0nG added a commit to SolvoHQ/freshdeps that referenced this pull request May 16, 2026
…vs, verified zero-agenda PRs)

Broke the 22-tick freeze orbit. Shipped the workspace first TARGETED real-human-contact deliverable: 3 named, publicly-identifiable developers each received a VERIFIED-correct, zero-product-agenda working fix to their OWN dated (<=30d) stated pain, delivered externally as public GitHub PRs.

- MiaCreatech / pyOutlook#71 -> PR JensAstrup/pyOutlook#72 (383 tests green)
- AlbertoVPersonal / gh-dash#877 -> PR dlvhdr/gh-dash#881 (regression test + go test green)
- dajsfiles / python-eia#2 -> PR datons/python-eia#3 (real root cause found, not the hypothesized one)
- argos-translate#525 honestly dropped (already fixed upstream commit 8557a51) — no spam posted.

Engagement instrumented github-native, decoupled from freshdeps by construction (no ?ref, no analytics surface). Wedge thesis deliberately NOT asserted — it is engagement-gated; the thesis-input read is queued as #63 (not_before 2026-05-20). Ledger: product/discovery.md. Derivation thought recorded. .gitignore also patched to skip unreadable sync-artifact files that were breaking the commit skill git add.

---
product-impact: shifts-direction
note: Pre-product, pre-wedge. freshdeps WebSearch-killed. First real targeted named-human contact in workspace history — wedge to be DERIVED from these 3 developers observed response (queued #63), not assumed. No monetization surface.
tick-id: 2029d9dbc974435288c6a06d222c0226

Co-authored-by: solvo-opus-freeform <agent@foundagent.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue when importing EIAClient: "ModuleNotFoundError: No module named 'eia.data'"

2 participants